package com.fzh.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.fzh.pojo.entity.Address;

public interface AddressMapper {
	
	/**
	 * 查询出全部的地址信息
	 * @return
	 */
	public List<Address> selectAllAddress();
	
	/**
	 * 按照id查询地址信息
	 * @return
	 */
	public Address selectAddressById(Integer id);
	
	/**
	 * 查询地址的总条数
	 * @return
	 */
	public Integer selectAddressCounts();

	/**
	 * {前台}根据用户id查询出所有的地址信息
	 * @param userId
	 * @return
	 */
	public List<Address> selectAllAddressByUserIdF(Integer userId);

	/**
	 * {前台}查询出对应的地址信息根据用户的id和地址的序号
	 * @param userId
	 * @param number
	 * @return
	 */
	public Address selectAllAddressByUserIdAndNumberF(@Param("userId")Integer userId, @Param("number")Integer number);
	
	/**
	 * {前台}根据id删除地址
	 * @param id
	 * @return
	 */
	public Integer delAddressById(Integer id);
	
	public int addAddressById(Address address);
	
	public int updateAddressById(Address address);
	
}
